<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>this 和 call</title>
</head>
<body>

<script>
  // http://www.imooc.com/article/1758
  // 作用域
  var x = 10;
  var obj = {
    x: 20,
    f: function () {
      console.log(this.x);
      var foo = function () {
        console.log(this.x);
      }
      foo(); // foo.call(window)
    }
  }
  obj.f(); // obg.f.call(obg);














</script>
</body>
</html>